// https://github.com/chriskempson/tomorrow-theme
// use theme: night

@import "_variables";

// theme: night
$highlight-background: #1d1f21;
$highlight-current-line: #282a2e;
$highlight-selection: #373b41;
$highlight-foreground: #c5c8c6;
$highlight-comment: #969896;
$highlight-red: #cc6666;
$highlight-orange: #de935f;
$highlight-yellow: #f0c674;
$highlight-green: #b5bd68;
$highlight-aqua: #8abeb7;
$highlight-blue: #81a2be;
$highlight-purple : #b294bb;

// theme: night eighties
$highlight-background: #2d2d2d;
$highlight-current-line: #393939;
$highlight-selection: #515151;
$highlight-foreground: #cccccc;
$highlight-comment: #999999;
$highlight-red: #f2777a;
$highlight-orange: #f99157;
$highlight-yellow: #ffcc66;
$highlight-green: #99cc99;
$highlight-aqua: #66cccc;
$highlight-blue: #6699cc;
$highlight-purple: #cc99cc;

.code-block {
    background: $highlight-background;
    //margin: 0 $article-padding * -1;
    margin: 2ex 0;
    padding: 1rem $article-padding;
    border-style: solid;
    border-color: #333;
    border: 1px 0;
    border-radius: 2px;
    overflow: auto;
    color: $highlight-foreground;
    font-size: $font-size-code;
    line-height: $line-height;
}

.line-numbers {
    color: #666;
    font-size: $font-size-code;
}

article {
    pre, code {
        font-family: $font-mono;
    }

    code {
        background: $color-background;
        text-shadow: 0 1px #fff;
        padding: 0 0.3rem;
    }

    pre {
        @extend .code-block;
        code {
            background: none;
            text-shadow: none;
            padding: 0;
        }
    }

    .highlight {
        @extend .code-block;

        pre {
            border: none;
            margin: 0;
            padding: 0;
        }
        table {
            margin: 0;
            width: auto;
        }
        td {
            border: none;
            padding: 0;
        }
        figcaption {
            @extend .clearfix;
            font-size: 0.85em;
            color: $highlight-comment;
            line-height: 1em;
            margin-bottom: 1em;
        }
        a {
            color: $highlight-aqua !important;
            text-decoration: none;
            float: right;
            &:hover {
                color: $highlight-blue !important;

            }
        }
        .gutter pre {
            @extend .line-numbers;
            text-align: right;
            padding-right: 20px;
        }
        .line {
            height: $line-height;
        }
    }

    .gist-not-used {
        //margin: 0 $article-padding * -1;
        margin: 0;
        border-style: solid;
        border-color: $color-border;
        border-width: 1px 0;
        background: $highlight-background;
        padding: 1em $article-padding 1em 2px;
        .gist-file {
            border: none;
            font-family: $font-mono;
            margin: 0;
            .gist-data {
                background: none;
                border: none;
                .line-numbers {
                    @extend .line-numbers;
                    background: none;
                    border: none;
                    padding: 0 20px 0 0;
                }
                .line-data {
                    padding: 0 !important;
                }
            }
            .highlight {
                margin: 0;
                padding: 0;
                border: none;
            }
            .gist-meta {
                background: $highlight-background;
                color: $highlight-comment;
                font: 0.85em $font-sans;
                text-shadow: 0 0;
                padding: 0;
                margin-top: 1em;
                margin-left: $article-padding;
                //
            }
            a {
                color: $color-link;
                font-weight: normal;
                &:hover {
                    text-decoration: underline;
                }
            }
        }
    }

    // for jsfiddle
    iframe {
        border: 1px solid #CCC;
    }
}


pre {
    .comment,
    .title {
        color: $highlight-comment;
    }
    .variable,
    .attribute,
    .tag,
    .regexp,
    .ruby .constant,
    .xml .tag .title,
    .xml .pi,
    .xml .doctype,
    .html .doctype,
    .css .id,
    .css .class,
    .css .pseudo {
        color: $highlight-red;
    }
    .number,
    .preprocessor,
    .built_in,
    .literal,
    .params,
    .constant {
        color: $highlight-orange;
    }
    .class,
    .ruby .class .title,
    .css .rules .attribute {
        color: $highlight-green;
    }
    .string,
    .value,
    .inheritance,
    .header,
    .ruby .symbol,
    .xml .cdata {
        color: $highlight-green;
    }
    .css .hexcolor{
        color: $highlight-aqua;
    }
    .function,
    .python .decorator,
    .python .title,
    .ruby .function .title,
    .ruby .title .keyword,
    .perl .sub,
    .javascript .title,
    .coffeescript .title {
        color: $highlight-blue;
    }
    .keyword,
    .javascript .function {
        color: $highlight-purple;
    }
}
